package com.example.security.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.security.mapper.UserMapper;
import com.example.security.domain.User;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
@RequiredArgsConstructor
@Service
public class UserService{

    private final UserMapper userMapper ;


    public List<User> queryUserList(User user) {
        QueryWrapper queryWrapper = new QueryWrapper<User>() ;
        return userMapper.selectList(queryWrapper);
    }

    public void create(User user) {
         userMapper.insert(user);
    }

    public void modify(User user) {
        userMapper.updateById(user);
    }

    public void remove(List<Integer> keys) {
        userMapper.deleteBatchIds(keys);
    }


}
